﻿<%@ Page Title="Registro de Usuario" Language="C#" MasterPageFile="~/Marco.Master" AutoEventWireup="true" CodeBehind="Registro.aspx.cs" Inherits="planet_express.Registro" %>


<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

<h3 class="Perfil">Registro de Usuario</h3>
<form id="registro" action="Default.aspx" method=post>
<div class="containerCampos">
    <div class="stiloCampos">
	    Usuario *
    </div>

    <div class="stiloTextBox">
       <asp:TextBox id="user" TextMode="SingleLine" Columns="30" runat="server"></asp:TextBox>
       
       
        <asp:Label ID="Label3" runat="server" ForeColor="Red"></asp:Label>
       
       
       <asp:RequiredFieldValidator id="reqUser" ControlToValidate="user" Text="El nombre de usuario es obligatorio" Display="dynamic"
ForeColor="Red" runat="server"></asp:RequiredFieldValidator><br />
        

    </div>
    </div>

<div class="containerCampos">
    <div class="stiloCampos">
	    Contrase&ntilde;a *
    </div>

    <div class="stiloTextBox">
        <asp:TextBox id="pass" TextMode="Password" Columns="30" runat="server"></asp:TextBox>
        
        <asp:RequiredFieldValidator id="reqPass" ControlToValidate="pass" Text="La contrase&ntilde;a es obligatoria" Display="dynamic"
ForeColor="Red" runat="server"></asp:RequiredFieldValidator><br />
    </div>
</div>

<div class="containerCampos">
    <div class="stiloCampos">
	    Repita su contrase&ntilde;a *
    </div>
    <div class="stiloTextBox">
        <asp:TextBox id="passOk" TextMode="Password" Columns="30" runat="server"></asp:TextBox>
        
        <asp:RequiredFieldValidator id="requPassOk" ControlToValidate="passOk" Text="Debe repetir su Contrase&ntilde;a" Display="dynamic"
ForeColor="Red" runat="server"></asp:RequiredFieldValidator>
        
        <asp:CompareValidator id="valPass" Display="Dynamic" ControlToValidate="pass" ControlToCompare="passOk" ForeColor="Red"
Text="La contrase&ntilde;a no coincide" runat="server" /><br />
    </div>
</div>

<div class="containerCampos">
    <div class="stiloCampos">
        CIF / NIF *
    </div>
    <div class="stiloTextBox">
        <asp:TextBox ID="id" TextMode="SingleLine" Columns="8" runat="server"></asp:TextBox>
        Letra *<asp:TextBox id="letra" TextMode="SingleLine" Columns="2" runat="server"></asp:TextBox>
        
        <asp:Label ID="Label1" runat="server" ForeColor="Red"></asp:Label>
        
        <asp:RequiredFieldValidator ID="reqId" ControlToValidate="id" Text="El CIF / NIF es obligatorio. " Display="Dynamic"
ForeColor="Red" runat="server"></asp:RequiredFieldValidator>
        
        <asp:RequiredFieldValidator ID="reqLetra" ControlToValidate="letra" Text="La letra es obligatoria" Display="Dynamic"
ForeColor="Red" runat="server"></asp:RequiredFieldValidator><br />
    </div>
</div>

<div class="containerCampos">
    <div class="stiloCampos">
	    Nombre *
    </div>
    <div class="stiloTextBox">
        <asp:TextBox id="nombre" TextMode="SingleLine" Columns="30" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator id="reqNombre" ControlToValidate="nombre" Text="El nombre es obligatorio" Display="dynamic"
ForeColor="Red" runat="server"></asp:RequiredFieldValidator><br />
    </div>
</div>

<div class="containerCampos">
    <div class="stiloCampos">
	    Apellidos *
    </div>
    <div class="stiloTextBox">
        <asp:TextBox id="apellidos" TextMode="SingleLine" Columns="30" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator id="reqApellidos" ControlToValidate="apellidos" Text="Los apellidos son obligatorios" Display="dynamic"
ForeColor="Red" runat="server"></asp:RequiredFieldValidator><br />
    </div>
</div>

<div class="containerCampos">
    <div class="stiloCampos">
	    E-mail * <br />
    </div>

    <div class="stiloTextBox">
        <asp:TextBox id="mail" TextMode="SingleLine" Columns="30" runat="server"></asp:TextBox>
        
        <asp:RequiredFieldValidator id="reqMail" ControlToValidate="mail" Text="El e-mail es obligatorio" Display="dynamic"
ForeColor="Red" runat="server"></asp:RequiredFieldValidator><br />
        <asp:RegularExpressionValidator id="valMail" ControlToValidate="mail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
ForeColor="Red" Text="E-mail no valido. Ejemplo: user@mail.com" Display="dynamic" runat="server"></asp:RegularExpressionValidator><br />
    </div>
</div>

<div class="reservaCalend" >
    <div class="IdaCalend">
	    <p>Fecha de Nacimiento</p>
        <asp:Calendar ID="Calendar1" CssClass="CalIda" runat="server" BackColor="White"
            BorderColor="#999999" CellPadding="4" 
            DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" 
            ForeColor="Black" Height="180px" Width="200px" SelectedDate="1994-02-02">
            <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
            <NextPrevStyle VerticalAlign="Bottom" />
            <OtherMonthDayStyle ForeColor="#808080" />
            <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
            <SelectorStyle BackColor="#CCCCCC" />
            <TitleStyle BackColor="#999999" BorderColor="Black" 
                Font-Bold="True" />
            <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
            <WeekendDayStyle BackColor="#FFFFCC" />
         </asp:Calendar>
        <asp:Label ID="Label2" runat="server" ForeColor="Red"></asp:Label>
    </div>
</div>
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>
<div class="containerCampos">
    <div class="stiloCampos">
	    Pais 
     </div>

     <div class="stiloTextBox">
        <asp:DropDownList ID="paisList" runat="server" AutoPostBack="True" 
             DataSourceID="SqlDataSourceCountry" DataTextField="LocalName" 
             DataValueField="Code" 
             onselectedindexchanged="paisList_SelectedIndexChanged">
        <asp:ListItem Selected="True" Value="default">-- Selecciona --</asp:ListItem>
        </asp:DropDownList>
         <asp:SqlDataSource ID="SqlDataSourceCountry" runat="server" 
             ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
             SelectCommand="SELECT [Code], [LocalName] FROM [COUNTRY] ORDER BY [LocalName], [Code]">
         </asp:SqlDataSource>
    </div>        
</div>

<div class="containerCampos">
    <div class="stiloCampos">
	    Provincia 
    </div>
    <div class="stiloTextBox">
        <asp:DropDownList ID="provinciaList" runat="server" 
            DataSourceID="SqlDataSourceCity"  
            DataTextField="Name" DataValueField="Name">
        <asp:ListItem Selected="True" Value="default">-- Selecciona --</asp:ListItem>
        </asp:DropDownList>
       
        <asp:SqlDataSource ID="SqlDataSourceCity" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            SelectCommand="SELECT * FROM [CITY] WHERE ([CountryCode] = @CountryCode) ORDER BY [Name]">
            <SelectParameters>
                <asp:ControlParameter ControlID="paisList" Name="CountryCode" 
                    PropertyName="SelectedValue" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
       
    </div>
</div>

<div class="containerCampos">
    <div class="stiloCampos">
	    Ciudad
    </div>
    <div class="stiloTextBox">
        <asp:TextBox id="ciudad" TextMode="SingleLine" Columns="30" runat="server"></asp:TextBox>
    </div>
</div>
    
 <div class="containerCampos">
    <div class="stiloCampos">
	    Direccion
    </div>
    <div class="stiloTextBox">
        <asp:TextBox id="direccion" TextMode="SingleLine" Columns="30" runat="server"></asp:TextBox>
    </div>
</div>

<div class="containerCampos">
    <div class="stiloCampos">
	    Telefono
    </div>
    <div class="stiloTextBox">
        <asp:TextBox id="telefono" TextMode="SingleLine" Columns="10" runat="server"></asp:TextBox>
        
        <asp:RangeValidator id="valTelefono" ControlToValidate="telefono" MaximumValue="999999999" Display="dynamic" ForeColor="Red"
Text="El telefono debe tener hasta 9 digitos" runat="server"></asp:RangeValidator>

    </div>
</div>

<div class="containerCampos">
    <div class="stiloCampos">
	    VIP 
    </div>
    <div class="stiloTextBox">
        <asp:DropDownList ID="DropDownList1" runat="server">
        <asp:ListItem Value="true">Si</asp:ListItem>
        <asp:ListItem Value="false" Selected="True">No</asp:ListItem>
        </asp:DropDownList>
    </div>
</div>
<p>&nbsp;</p>
<div class="botones">
	<asp:Button id="enviar" Text="Enviar" runat="server" onclick="enviar_Click" />
    <asp:Button ID="borrar" Text="Borrar" runat="server" />
</div>
</form>
</asp:Content>